import 'package:flutter/widgets.dart';

class PersonInfo with ChangeNotifier {
  String account = "";
  String name = "";
  String alliance = "";
  String status = "";
  String act = "";
  String password = "";
  List keyword = [];
  int count = 0;
  bool examine = false;
  void changeAll({required value}) {
    name = value[2];
    alliance = value[4];
    status = value[5] ?? "";
    act = value[7];
    keyword = value[8].split(" ");
    count = int.parse(value[9]);
    password = value[3];
    if (value[11] == "True") {
      examine = true;
    }
  }

  void changExamine({required bool value}) {
    examine = value;
    notifyListeners();
  }

  void changPassword({required String value}) {
    password = value;
    notifyListeners();
  }

  void changAccount({required String value}) {
    account = value;
    notifyListeners();
  }

  void changName({required String value}) {
    name = value;
    notifyListeners();
  }

  void changAliance({required String value}) {
    alliance = value;
    notifyListeners();
  }

  void changAct({required String value}) {
    act = value;
    notifyListeners();
  }

  void changKeyword({required List value}) {
    keyword = value;
    notifyListeners();
  }

  void changCount({required int value}) {
    count = value;
    notifyListeners();
  }
}
